package com.ruoyi.ruoyixingyue.modules.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 视频文件表
 * </p>
 *
 * @author lzz
 * @since 2024-04-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("xy_media")
@ApiModel(value="Media对象", description="视频文件表")
public class Media implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "媒体播放地址")
    private String mediaUrl;

    @ApiModelProperty(value = "媒体封面地址")
    private String coverUrl;

    @ApiModelProperty(value = "视频时长，单位秒")
    private Long duration;

    @ApiModelProperty(value = "视频大小，单位是字节")
    private Long size;

    @ApiModelProperty(value = "状态：1-上传中，2-已上传")
    private Integer status;

    @ApiModelProperty(value = "平台 0-阿里 1-腾讯")
    private Integer platform;

    @TableField(exist = false)
    private String statusName;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "逻辑删除，默认0")
    private Integer deleted;


}
